package base1

import (
	gee "../../day1-http-base/base3/gee"
	"fmt"
	"net/http"
)

func main() {
	r := gee.New()
	// handler是作为匿名函数传进去的
	// 调用gee里面的GET方法 还是需要自己写代码注册的
	r.GET("/", func(c *gee.Context) {
		fmt.Fprintf(w, "URL.Path=%q\n", req.URL.Path)
	})
	r.GET("/hello", func(w http.ResponseWriter, req *http.Request) {
		for k, v := range req.Header {
			fmt.Fprintf(w, "Header[%q]=%q\n", k, v)
		}
	})

	r.Run(":9999")
}
